class MovieRepository:
    def __init__(self):
        self.favorites = {}

    def add_favorite(self, user_id, movie_id):
        if user_id not in self.favorites:
            self.favorites[user_id] = []
        if movie_id not in self.favorites[user_id]:
            self.favorites[user_id].append(movie_id)
        return self.favorites[user_id]

    def get_favorites(self, user_id):
        return self.favorites.get(user_id, [])
    